package org.jeecg.modules.demo.ch.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: 模具设计BOM的EXCEL导入表
 * @Author: jeecg-boot
 * @Date:   2022-09-12
 * @Version: V1.0
 */
@Data
@TableName("ch_design_bom")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="ch_design_bom对象", description="模具设计BOM的EXCEL导入表")
public class ChDesignBom implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
	/**序号*/
	@Excel(name = "序号", width = 15)
    @ApiModelProperty(value = "序号")
    private String serialNumber;
	/**零件名*/
	@Excel(name = "零件名", width = 15)
    @ApiModelProperty(value = "零件名")
    private String partName;
	/**中文名*/
	@Excel(name = "中文名", width = 15)
    @ApiModelProperty(value = "中文名")
    private String chineseName;
	/**英文名*/
	@Excel(name = "英文名", width = 15)
    @ApiModelProperty(value = "英文名")
    private String englishName;
	/**零件规格*/
	@Excel(name = "零件规格", width = 15)
    @ApiModelProperty(value = "零件规格")
    private String partSpecification;
	/**材料*/
	@Excel(name = "材料", width = 15)
    @ApiModelProperty(value = "材料")
    private String material;
	/**数量*/
	@Excel(name = "数量", width = 15)
    @ApiModelProperty(value = "数量")
    private Integer number;
	/**备注*/
	@Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remark;
	/**bom状态（1.新增2.变更3.取消）*/
	@Excel(name = "bom状态（1.新增2.变更3.取消）", width = 15)
    @ApiModelProperty(value = "bom状态（1.新增2.变更3.取消）")
    private Integer bomStatus;
	/**转益模的状态（1.未转2.已转）*/
	@Excel(name = "转益模的状态（1.未转2.已转）", width = 15)
    @ApiModelProperty(value = "转益模的状态（1.未转2.已转）")
    private Integer transferBenefitModelStatus;
	/**是否删除（0.正常1.删除）*/
	@Excel(name = "是否删除（0.正常1.删除）", width = 15)
    @ApiModelProperty(value = "是否删除（0.正常1.删除）")
    private Integer isDelete;
	/**自定义字段1*/
	@Excel(name = "自定义字段1", width = 15)
    private transient String customFields1String;

    private byte[] customFields1;

    public byte[] getCustomFields1(){
        if(customFields1String==null){
            return null;
        }
        try {
            return customFields1String.getBytes("UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return null;
    }

    public String getCustomFields1String(){
        if(customFields1==null || customFields1.length==0){
            return "";
        }
        try {
            return new String(customFields1,"UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return "";
    }
	/**自定义字段2*/
	@Excel(name = "自定义字段2", width = 15)
    @ApiModelProperty(value = "自定义字段2")
    private String customFields2;
	/**自定义字段3*/
	@Excel(name = "自定义字段3", width = 15)
    @ApiModelProperty(value = "自定义字段3")
    private String customFields3;
	/**自定义字段4*/
	@Excel(name = "自定义字段4", width = 15)
    @ApiModelProperty(value = "自定义字段4")
    private String customFields4;
	/**自定义字段5*/
	@Excel(name = "自定义字段5", width = 15)
    @ApiModelProperty(value = "自定义字段5")
    private String customFields5;
	/**模具设计BOM主表id*/
	@Excel(name = "模具设计BOM主表id", width = 15)
    @ApiModelProperty(value = "模具设计BOM主表id")
    private String chDesignBomMasterId;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private String sysOrgCode;
}
